package com.qianfeng.openplateform.search.controller;

import com.qianfeng.openplateform.search.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 江江
 * @Date 2020/7/30 10:38
 */
@RestController
public class SearchController {
    @Autowired
    private SearchService searchService;

    @RequestMapping("/create")
    public String createIndexAndType() {
        if (searchService.createIndex()) {
            return "创建成功";
        } else {
            return "失败";
        }
    }
}
